﻿@using ExcellentCRM.DataService.Models
@using ExcellentCRM.Site.Utilities
@{
    Layout = null;
}
<style type="text/css">
    #logoContain,#userInfoContain {
        line-height: 45px;
    }
    #logoContain a,#userInfoContain a {
        text-decoration: none;
        padding: 14px 15px 17px;
    }
    #userInfoContain {
        margin-bottom: 0;
    }
    #userInfoContain a.dk_toggle {
        padding: 0 45px 0 13px;
        margin-top: 2px;
    }
</style>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="navbar navbar-inverse navbar-fixed-top">
                <div class="navbar-inner">
                    <div id="logoContain" class="pull-left">
                        <a href="@Url.Action("Index", "Home")" title="@PresetValues.SiteName">
                            <img src="@Url.Content("~/Images/ExcellentLogo.png")" alt="@PresetValues.SiteName"/>
                        </a>
                    </div>
                    <div id="userInfoContain" class="pull-right dk_container dk_shown">
                        <a href="javascript:;" data-toggle="dropdown" class="dk_toggle">
                            <span class="dk_label">
                                <i class="icon-user icon-white"></i>
                                @User.Identity.Name
                            </span>
                            <span class="select-icon"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li>
                                <a href="@Url.Action("ChangePassword", "Account")" data-toggle="modal" data-target="#changePassModal">
                                    <i class="icon-pencil"></i>
                                    修改密码
                                </a>
                            </li>
                            <li>
                                <a href="#logoutModal" data-toggle="modal">
                                    <i class="icon-circle-arrow-left"></i>
                                    退出登录
                                </a>
                            </li>
                        </ul>
                    </div>
                    <div class="container">
                        <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <div class="nav-collapse collapse">
                            <ul class="nav">
                                @{
                                    var menus = ViewBag.Menus;
                                    string activeAct = ViewBag.ActiveAct ?? "";
                                    if (menus != null)
                                    {
                                        foreach (Menu menu in menus)
                                        {
                                            <li class="@(activeAct == string.Format("{0}_{1}", menu.CtlName, menu.ActName) ? "active" : "")">
                                                <a href="@(string.IsNullOrWhiteSpace(menu.MenuUrl) ? Url.Action(menu.ActName, menu.CtlName) : menu.MenuUrl)">
                                                    @menu.MenuName
                                                </a>
                                            </li>
                                        }
                                    }
                                }
                                <li class="@((ViewBag.ActiveAct??"") == "StuClient_Index" ? "active" : "")">
                                    <a href="@Url.Action("Index", "StuClient")">
                                        客户详情
                                        @*<span class="navbar-unread">1</span>*@
                                    </a>
                                </li>
                                <li class="@((ViewBag.ActiveAct??"") == "Schedule_Index" ? "active" : "")">
                                    <a href="@Url.Action("Index", "Schedule")">
                                        工作日志
                                        @*<span class="navbar-unread">1</span>*@
                                    </a>
                                </li>
                                <li class="@((ViewBag.ActiveAct??"") == "Account_Manage" ? "active" : "")">
                                    <a href="@Url.Action("Manage", "Account")">
                                        用户管理
                                    </a>
                                    @*<ul>
                                        <li><a href="#">Element One</a></li>
                                        <li>
                                            <a href="#">Sub menu</a>
                                            <ul>
                                                <li><a href="#">Element One</a></li>
                                                <li><a href="#">Element Two</a></li>
                                                <li><a href="#">Element Three</a></li>
                                            </ul>
                                        </li>
                                        <li>
                                            <a href="#">Element Three</a>
                                        </li>
                                    </ul>*@
                                </li>
                                <li class="@((ViewBag.ActiveAct??"") == "Department_Index" ? "active" : "")">
                                    <a href="@Url.Action("Index", "Department")">
                                        部门管理
                                    </a>
                                </li>
                                <li class="@((ViewBag.ActiveAct??"") == "" ? "active" : "")">
                                    <a href="#">
                                        角色管理
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="logoutModal" class="modal hide fade" tabindex="-1" data-backdrop="static"
     role="dialog" aria-labelledby="logoutModalLabel" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="logoutModalLabel">登出确认</h3>
    </div>
    <div class="modal-body">
        <p>是否确定要登出?</p>
    </div>
    <div class="modal-footer">
        <button onclick="window.location.href='@Url.Action("LogOff", "Account")'" class="btn btn-primary">确定</button>
        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    </div>
</div>
<div id="changePassModal" class="modal hide fade" tabindex="-1" data-backdrop="static" role="dialog">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="changePassModalLabel">修改密码</h3>
    </div>
    <div class="modal-body">
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary">保存</button>
        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    </div>
</div>